package cn.huiyunche.base.service.enums;

/**
 * 劳务价格导入结果说明
 *
 * @author lm
 */
public enum VehicleFuelImportResultEnum {

    VEHICLE_NOT_NULL(1,"车型不能为空"),
    VEHICLE_ID_NOT_NULL(2,"车型ID不能为空"),
    TANK_VOLUME_NOT_NULL(3,"油箱容积不能为空"),
    OIL_TYPE_NAME_NOT_NULL(4,"油品名称不能为空"),
    STANDARD_OC_NOT_NULL(5,"油耗不能为空"),
    EFFECTIVE_DATE_NOT_NULL(6,"生效日期不能为空"),
    VEHICLE_REPEAT(7, "车型重复"),
    STANDARD_OC_THAN_ZERO(8, "油耗必须大于0"),
    EFFECTIVE_DATE_THAN_NOW(9, "生效日期必须大于当前日期"),
    OIL_TYPE_NAME_NOT_EXIST(10,"油品必须存在于数据库中"),
    VEHICLE_NOT_EXIST(11,"车型不存在，导入时会自动新增"),
    EFFECTIVE_DATE_THAN_BEFORE(12,"生效日期必须大于已存在日期");

    private final int value;
    private final String text;

    VehicleFuelImportResultEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static VehicleFuelImportResultEnum getByValue(int value) {
        for (VehicleFuelImportResultEnum temp : VehicleFuelImportResultEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
